def sort_tuples(tuple_list):
    return sorted(tuple_list, key=lambda x: x[-1])

sample_list = [(2, 5), (1, 2), (4, 4), (2, 3), (2, 1)]
print(sort_tuples(sample_list))